<?php
require_once("vcl/vcl.inc.php");
require_once("lib/db_connection.php");
require_once("Writer.php");
//Includes
use_unit("components4phpfull/jtpagecontrol.inc.php");
use_unit("components4phpfull/jtjavascript.inc.php");
use_unit("components4phpfull/jtsitetheme.inc.php");
use_unit("platinumgrid/jtplatinumgrid.inc.php");
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class Vehicle_Workorder_List_Frame extends Page
{
       public $JSComplete = null;
       public $JSEdit = null;
       public $JTPlatinumVehicleWorkOrder = null;
       public $btnSearch = null;
       public $edtSearch = null;
       public $Image4 = null;
       public $btnExport = null;
       public $JTJavaScript1 = null;
       public $Image1 = null;
       public $imgAddWO = null;
       public $JTSiteTheme1 = null;
       public $hiddenId = null;
       function imgAddWOJSClick($sender, $params)
       {

       ?>
       /*
       var win_height = 770;
       var win_width = 975;
       var height = window.outerHeight;
       var width = window.outerWidth;
       var top = Math.round((height-win_height)/2);
       var left = Math.round((width-win_width)/2);
       veh_id = document.getElementById('hiddenId').value;
       window.open("veh_workorder_create_frame.php?veh="+veh_id, 'Edit_Access_Level', 'scrollbars=yes,location=no,height='+win_height+',width='+win_width+',top='+top+',left='+left);
       */
       //alert(parent.document.location.href);
       veh_id = document.getElementById('hiddenId').value;
       parent.workorder_open_create(veh_id);
       <?php

       }


       function JTCompleteShow($sender, $params)
       {
       $veh_id = $this->hiddenId->getValue();

       $query1 = "select * from vehicle_tbl where vehicle_id='".$this->hiddenId->getValue()."'";
       $result = mysql_query($query1)or die(mysql_error());
       $row = mysql_fetch_array($result);
       $label_od = $row['track_by'];


       if ($label_od=='distance')
       {
       $string1 = 'Odometer';
       $label = 'Km';
       }
       else
       {
       $string1 = 'Clock Hrs';
       $label = 'Hrs';
       }

       $query_wo = "select * from veh_workorder_tbl where vehicle_id='".$veh_id."' and complete='1' and
       (creation_date like '%".$this->edtSearch->Text."%'
       or order_num like '%".$this->edtSearch->Text."%'
       or odometer like '%".$this->edtSearch->Text."%'
       or description like '%".$this->edtSearch->Text."%'
       or service_provider like '%".$this->edtSearch->Text."%') order by creation_date desc";
       $result_wo = mysql_query($query_wo)or die(mysql_error());

       $arr = array();
       while($row_wo = mysql_fetch_array($result_wo))
       {
       $WO = $row_wo['workorder_id'];
       $creation_date = "<a href=veh_workorder_edit.php?veh=".$veh_id."&WO=".$row_wo['workorder_id']." title='edit work summary'>".$row_wo['creation_date']."</a>";

       $enc_veh_id = base64_encode($veh_id);
       $enc_wo = base64_encode($row_wo['workorder_id']);

       if($_SESSION['access_vehicle']==1)
       {
       $tools2 = "<img onclick=window.open('print_wo.php?veh=".$enc_veh_id."&WO=".$enc_wo."','popup','width=850,height=1000,scrollbars=yes,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); src='image/print.png' title='Print Work Summary' style='cursor:pointer'>";
       }

       if($_SESSION['access_vehicle']==2)
       {
       $tools2 = "<img onclick=window.open('print_wo.php?veh=".$enc_veh_id."&WO=".$enc_wo."','popup','width=850,height=1000,scrollbars=yes,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); src='image/print.png' title='Print Work Summary' style='cursor:pointer'>
       <img onclick=js_deleteWO('".$veh_id."','".$WO."'); src='image/delete.png' title='delete' style='cursor:pointer'>";
       }
       //<a href=veh_laborline_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/laborline.png' title='laborline' no border></a>
       //<a href=veh_parts_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/parts.png' title='parts list' no border></a>
       //<a href=veh_workorder_delete.php?veh=".$veh_id."&WO=".$WO."><img src='image/delete_orange.jpg' title='delete' no border></a>";

       //status
       $complete=$row_wo['complete'];

       $total = $row_wo['total'];
       $ctotal = $this->commafy($total);

       if($complete=='1')
       {
       $status="Complete";
       $color = "Silver";
       }
       if($complete=='0')
       {
       $status="Pending";
       $color = "Black";
       }

       $ser_prov = $row_wo['service_provider'];

       if($ser_prov=='--Select--')
       {
       $service = '';
       }
       if($ser_prov!='--Select--')
       {
       $service = $ser_prov;
       }

       $tracking = $row_wo['track_by'];
       if($tracking=='distance')
       {
       $lbl='Km';
       }
       if($tracking=='hours')
       {
       $lbl='Hrs';
       }

       $tids = $row_wo['trouble_ids'];
       $tids = explode(',',$tids);

       $troubles = "";
       foreach($tids as $tid)
       {
        $query_first_lvl = "SELECT trouble FROM veh_trouble_tbl WHERE autoid='".$tid."'";
        $result_first_lvl = mysql_query($query_first_lvl) or die("SELECT FIRST LEVEL TROUBLE ".mysql_erorr());;
        $row_first_lvl = mysql_fetch_array($result_first_lvl);

        $query_sel_trouble = "SELECT value FROM trouble_droplist_tbl WHERE autoid='".$row_first_lvl['trouble']."'";
        $result_sel_trouble = mysql_query($query_sel_trouble) or die("SELECT TROUBLE ".mysql_error());
        $row_sel_trouble = mysql_fetch_array($result_sel_trouble);
        $troubles .= $row_sel_trouble['value']."<br />";
       }
       //'Serviced by' => $service,

       if($_SESSION['isAdmin']=='1')
       {
       $arr[] = array(
                        'Date' => $creation_date,
                        'Reference No.' => $row_wo['order_num'],
                        'Trouble' => $troubles,
                        'Type' => $row_wo['description'],
                        'Km/Hrs' => $row_wo['odometer'].$lbl,
                        'Total' => "<p align='right'>".$ctotal."</p>",
                        //'Status' => $status,
                        'Tools' => $tools2
                        );
       }

       if($_SESSION['isAdmin']!='1')
       {
       $tools2 = "<a href=veh_laborline_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/laborline.png' title='laborline' no border></a>
       <a href=veh_parts_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/parts.png' title='parts list' no border></a>";
       $arr[] = array(
                        'Date' => $row_wo['creation_date'],
                        'Reference No.' => $row_wo['order_num'],
                        'Trouble' => $troubles,
                        'Type' => $row_wo['description'],
                        'Km/Hrs' => $row_wo['odometer'].$lbl,
                        'Total' => "<p align='right'>".$ctotal."</p>",
                        //'Status' => $status,
                        'Tools' => $tools2
                        );
       }












       //w/ status
       /*$total = $row['total'];
       $ctotal = $this->commafy($total);


       if($_SESSION['isAdmin']=='1')
       {
       $arr[] = array(
                        'Date' => "<p style='color:".$color."'>".$creation_date."</p>",
                        'Order' => "<p style='color:".$color."'>".$row['order_num']."</p>",
                        'Description' => "<p style='color:".$color."'>".$row['description']."</p>",
                        $string1 => "<p style='color:".$color."'>".$row['odometer']."</p>",
                        'Serviced by' => "<p style='color:".$color."'>".$row['service_provider']."</p>",
                        'Total' => "<p style='color:".$color."' align='right'>".$ctotal."</p>",
                        'Status' => "<p style='color:".$color."'>".$status."</p>",
                        'Tools' => "<p style='color:".$color."'>".$tools2."</p>"
                        );
       }

       if($_SESSION['isAdmin']!='1')
       {
       $tools2 = "<a href=veh_laborline_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/laborline.png' title='laborline' no border></a>
       <a href=veh_parts_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/parts.png' title='parts list' no border></a>";
       $arr[] = array(
                        'Date' => "<p style='color:".$color."'>".$row['creation_date']."</p>",
                        'Order' => "<p style='color:".$color."'>".$row['order_num']."</p>",
                        'Description' => "<p style='color:".$color."'>".$row['description']."</p>",
                        $string1 => "<p style='color:".$color."'>".$row['odometer']."</p>",
                        'Serviced by' => "<p style='color:".$color."'>".$row['service_provider']."</p>",
                        'Total' => "<p style='color:".$color."' align='right'>".$ctotal."</p>",
                        'Status' => "<p style='color:".$color."'>".$status."</p>",
                        'Tools' => "<p style='color:".$color."'>".$tools2."</p>"
                        );
       }*/

       }

       $this->JTComplete->setCellData($arr);



       }



       function imgAddWOClick($sender, $params)
       {



       }

       function btnExportJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['btnExport'].src="image/excel.png"
       <?php

       }

       function btnExportJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['btnExport'].src="image/excel2.png"
       <?php

       }

       function btnExportClick($sender, $params)
       {
       $this->JTGridWorkorderExcel->exportGridToXLSDownload('vehicle_workorder_report.xls');
       }

       function JTGridWorkorderExcelShow($sender, $params)
       {
       $veh_id = $this->hiddenId->getValue();

       $query_veh = "select * from vehicle_tbl where vehicle_id='".$this->hiddenId->getValue()."'";
       $result_veh = mysql_query($query_veh)or die(mysql_error());
       $row_veh = mysql_fetch_array($result_veh);

       $query_excel = "select * from veh_workorder_tbl where vehicle_id='".$veh_id."' and
       (creation_date like '%".$this->edtSearch->Text."%'
       or order_num like '%".$this->edtSearch->Text."%'
       or odometer like '%".$this->edtSearch->Text."%'
       or description like '%".$this->edtSearch->Text."%'
       or service_provider like '%".$this->edtSearch->Text."%')";
       $result_excel = mysql_query($query_excel)or die("EXCEL ".mysql_error());

       $arr_excel = array();
       $overall_total = 0;



       $arr_excel[] = array(
                        '1' => 'Plate Num:'.' '.$row_veh['veh_num'],
                        '2'=> ' ',
                        '3' => ' ',
                        '4' => ' ',
                        '5' => ' ',
                        '6' => ' ',
                        '7' => ' ',
                        '8' => ' ',
                        '9' => ' '
                    );

       $arr_excel[] = array(
                        '1' => 'Year:'.' '.$row_veh['year'],
                        '2'=>' ',
                        '3' => ' ',
                        '4' => ' ',
                        '5' => ' ',
                        '6' => ' ',
                        '7' => ' ',
                        '8' => ' ',
                        '9' => ' '
                    );

       $arr_excel[] = array(
                        '1' => 'Make:'.' '.$row_veh['manufacturer_name'],
                        '2'=>' ',
                        '3' => ' ',
                        '4' => ' ',
                        '5' => ' ',
                        '6' => ' ',
                        '7' => ' ',
                        '8' => ' ',
                        '9' => ' '
                    );

       $arr_excel[] = array(
                        '1' => 'Model:'.' '.$row_veh['model_name'],
                        '2'=> ' ',
                        '3' => ' ',
                        '4' => ' ',
                        '5' => ' ',
                        '6' => ' ',
                        '7' => ' ',
                        '8' => ' ',
                        '9' => ' '
                    );

       $arr_excel[] = array(
                        '1' => 'Type/Style:'.' '.$row_veh['style_name'],
                        '2'=> ' ',
                        '3' => ' ',
                        '4' => ' ',
                        '5' => ' ',
                        '6' => ' ',
                        '7' => ' ',
                        '8' => ' ',
                        '9' => ' '
                    );

       $arr_excel[] = array(
                        '1' => ' ',
                        '2'=>' ',
                        '3' => ' ',
                        '4' => ' ',
                        '5' => ' ',
                        '6' => ' ',
                        '7' => ' ',
                        '8' => ' ',
                        '9' => ' '
                    );


       $arr_excel[] = array(
                        '1' => 'WORK SUMMARY REPORT',
                        '2'=>' ',
                        '3' => ' ',
                        '4' => ' ',
                        '5' => ' ',
                        '6' => ' ',
                        '7' => ' ',
                        '8' => ' ',
                        '9' => ' '
                    );

       $arr_excel[] = array(
                       '1'=>'Date',
                       '2'=>'Reference No.',
                       '3'=>'Type',
                       '4'=>'Km/Hrs',
                       '5'=>'Serviced by',
                       '6'=>'Labor',
                       '7'=>'Parts',
                       '8'=>'Miscellaneous',
                       '9'=>'Total'
        );

       while($row_excel = mysql_fetch_array($result_excel))
       {
        $track_by = $row_excel['track_by'];
        if($track_by=='distance')
        {
        $lbl = 'Km';
        }

        if($track_by=='hours')
        {
        $lbl = 'Hrs';
        }
        $arr_excel[] = array(
                       '1'=>$row_excel['creation_date'],
                       '2'=>$row_excel['order_num'],
                       '3'=>$row_excel['description'],
                       '4'=>$row_excel['odometer'].$lbl,
                       '5'=>$row_excel['service_provider'],
                       '6'=>$row_excel['labor'],
                       '7'=>$row_excel['parts'],
                       '8'=>$row_excel['misc'],
                       '9'=>$row_excel['total']
        );
        $overall_total += $row_excel['total'];
        $labor_total += $row_excel['labor'];
        $parts_total += $row_excel['parts'];
        $misc_total += $row_excel['misc'];
       }

       $arr_excel[] = array(
                       '1'=>'',
                       '2'=>'',
                       '3'=>'',
                       '4'=>'',
                       '5'=>'Overall Total',
                       '6'=>$labor_total,
                       '7'=>$parts_total,
                       '8'=>$misc_total,
                       '9'=> $overall_total
        );
       $this->JTGridWorkorderExcel->setCellData($arr_excel);
       }

       function edtSearchJSClick($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.getElementById('edtSearch').value = '';
       <?php

       }

       function btnSearchClick($sender, $params)
       {
       redirect('veh_workorder_list_frame.php?veh='.$this->hiddenId->getValue());
       }

       function imgAddWOJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgAddWO'].src="image/add_new.png"
       <?php

       }

       function imgAddWOJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgAddWO'].src="image/add_new_blue.png"
       <?php

       }

       function imgBackJSMouseOut($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgBack'].src="image/btn_back.png"
       <?php

       }

       function imgBackJSMouseOver($sender, $params)
       {

       ?>
       //Add your javascript code here
       document.images['imgBack'].src="image/btn_back2.png"
       <?php

       }


       function commafy($_)
       {
        return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,' , strrev( $_ ) ) );
       }



       function Vehicle_Workorder_List_FrameCreate($sender, $params)
       {
       if($_SESSION['access_vehicle']==1)
       {
        $this->imgAddWO->setVisible(false);
        $this->btnExport->Left = 943;
       }

       if($_SESSION['access_vehicle']==2)
       {
        $this->imgAddWO->setVisible(true);
        $this->btnExport->Left = 842;
       }

       $id = $_GET['veh'];
       $this->hiddenId->setValue($id);

       //$this->imgAddWO->setLink('veh_workorder_create.php?veh='.$this->hiddenId->getValue());
       }


       function JTPlatinumVehicleWorkOrderShow($sender, $params)
       {
       $veh_id = $this->hiddenId->getValue();

       $query1 = "select * from vehicle_tbl where vehicle_id='".$this->hiddenId->getValue()."'";
       $result = mysql_query($query1)or die(mysql_error());
       $row = mysql_fetch_array($result);
       $label_od = $row['track_by'];


       if ($label_od=='distance')
       {
       $string1 = 'Odometer';
       $label = 'Km';
       }
       else
       {
       $string1 = 'Clock Hrs';
       $label = 'Hrs';
       }

       $query_wo = "select * from veh_workorder_tbl where vehicle_id='".$veh_id."' and complete ='0' and
       (creation_date like '%".$this->edtSearch->Text."%'
       or completion_date like '%".$this->edtSearch->Text."%'
       or order_num like '%".$this->edtSearch->Text."%'
       or odometer like '%".$this->edtSearch->Text."%'
       or description like '%".$this->edtSearch->Text."%'
       or service_name like '%".$this->edtSearch->Text."%'
       or full_desc like '%".$this->edtSearch->Text."%'
       or total like '%".$this->edtSearch->Text."%'
       or trouble_name like '%".$this->edtSearch->Text."%') order by creation_date desc";
       $result_wo = mysql_query($query_wo)or die(mysql_error());

       $arr = array();
       while($row_wo = mysql_fetch_array($result_wo))
       {
       $WO = $row_wo['workorder_id'];
       //$creation_date = "<a href=veh_workorder_edit.php?veh=".$veh_id."&WO=".$row_wo['workorder_id']." title='edit work summary'>".$row_wo['creation_date']."</a>";
       $creation_date = "<span onClick=editWO('".$row_wo['workorder_id']."') title='Edit work order' style='color:blue;text-decoration:underline;cursor:pointer;'>".$row_wo['completion_date']."</span>";

       $enc_veh_id = base64_encode($veh_id);
       $enc_wo = base64_encode($row_wo['workorder_id']);

       if($_SESSION['access_vehicle']==1)
       {
       $tools2 = "<img onclick=window.open('print_wo.php?veh=".$enc_veh_id."&WO=".$enc_wo."&pr=order','popup','width=850,height=1000,scrollbars=yes,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); src='image/print.png' title='Print Work Order' style='cursor:pointer'>
       <img onclick=completeWO('".$row_wo['workorder_id']."') src='image/complete.png' title='Complete Work Order' style='cursor:pointer'>";
       }

       if($_SESSION['access_vehicle']==2)
       {
       $tools2 = "<img onclick=window.open('print_wo.php?veh=".$enc_veh_id."&WO=".$enc_wo."&pr=order','popup','width=850,height=1000,scrollbars=yes,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); src='image/print.png' title='Print Work Order' style='cursor:pointer'>
       <img onclick=completeWO('".$row_wo['workorder_id']."') src='image/complete.png' title='Complete Work Order' style='cursor:pointer'>
       <img onclick=js_deleteWO('".$veh_id."','".$WO."'); src='image/delete.png' title='delete' style='cursor:pointer'>";
       }
       //<a href=veh_laborline_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/laborline.png' title='laborline' no border></a>
       //<a href=veh_parts_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/parts.png' title='parts list' no border></a>
       //<a href=veh_workorder_delete.php?veh=".$veh_id."&WO=".$WO."><img src='image/delete_orange.jpg' title='delete' no border></a>";

       //status
       $complete=$row_wo['complete'];

       $total = $row_wo['total'];
       $ctotal = $this->commafy($total);

       if($complete=='1')
       {
       $status="Complete";
       $color = "Silver";
       }
       if($complete=='0')
       {
       $status="Pending";
       $color = "Black";
       }

       $ser_prov = $row_wo['service_name'];

       if($ser_prov=='--Select--')
       {
       $service = '';
       }
       if($ser_prov!='--Select--')
       {
       $service = $ser_prov;
       }

       $tracking = $row_wo['track_by'];
       if($tracking=='distance')
       {
       $lbl='Km';
       }
       if($tracking=='hours')
       {
       $lbl='Hrs';
       }


       $tids = $row_wo['trouble_ids'];
       $tids = explode(',',$tids);

       $troubles = "";
       foreach($tids as $tid)
       {
        $query_first_lvl = "SELECT trouble FROM veh_trouble_tbl WHERE autoid='".$tid."'";
        $result_first_lvl = mysql_query($query_first_lvl) or die("SELECT FIRST LEVEL TROUBLE ".mysql_erorr());;
        $row_first_lvl = mysql_fetch_array($result_first_lvl);

        $query_sel_trouble = "SELECT value FROM trouble_droplist_tbl WHERE autoid='".$row_first_lvl['trouble']."'";
        $result_sel_trouble = mysql_query($query_sel_trouble) or die("SELECT TROUBLE ".mysql_error());
        $row_sel_trouble = mysql_fetch_array($result_sel_trouble);
        $troubles .= $row_sel_trouble['value']."<br />";
       }
       //'Serviced by' => $service,
       if($_SESSION['isAdmin']=='1')
       {
       $arr[] = array(
                        'Date' => $creation_date,
                        'Reference No.' => $row_wo['order_num'],
                        'Trouble' => $troubles,
                        'Type' => $row_wo['description'],
                        'Km/Hrs' => $row_wo['odometer'].$lbl,
                        'Serviced by' => $service,
                        'Description' => $row_wo['full_desc'],
                        'Total' => "<p align='right'>".$ctotal."</p>",
                        //'Status' => $status,
                        'Tools' => $tools2
                        );
       }

       if($_SESSION['isAdmin']!='1')
       {
       $tools2 = "<a href=veh_laborline_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/laborline.png' title='laborline' no border></a>
       <a href=veh_parts_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/parts.png' title='parts list' no border></a>";
       $arr[] = array(
                        'Date' => $row_wo['completion_date'],
                        'Reference No.' => $row_wo['order_num'],
                        'Trouble' => $troubles,
                        'Type' => $row_wo['description'],
                        'Km/Hrs' => $row_wo['odometer'].$lbl,
                        'Serviced by' => $service,
                        'Description' => $row_wo['full_desc'],
                        'Total' => "<p align='right'>".$ctotal."</p>",
                        //'Status' => $status,
                        'Tools' => $tools2
                        );
       }












       //w/ status
       /*$total = $row['total'];
       $ctotal = $this->commafy($total);


       if($_SESSION['isAdmin']=='1')
       {
       $arr[] = array(
                        'Date' => "<p style='color:".$color."'>".$creation_date."</p>",
                        'Order' => "<p style='color:".$color."'>".$row['order_num']."</p>",
                        'Description' => "<p style='color:".$color."'>".$row['description']."</p>",
                        $string1 => "<p style='color:".$color."'>".$row['odometer']."</p>",
                        'Serviced by' => "<p style='color:".$color."'>".$row['service_provider']."</p>",
                        'Total' => "<p style='color:".$color."' align='right'>".$ctotal."</p>",
                        'Status' => "<p style='color:".$color."'>".$status."</p>",
                        'Tools' => "<p style='color:".$color."'>".$tools2."</p>"
                        );
       }

       if($_SESSION['isAdmin']!='1')
       {
       $tools2 = "<a href=veh_laborline_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/laborline.png' title='laborline' no border></a>
       <a href=veh_parts_list.php?veh=".$veh_id."&WO=".$WO."><img src='image/parts.png' title='parts list' no border></a>";
       $arr[] = array(
                        'Date' => "<p style='color:".$color."'>".$row['creation_date']."</p>",
                        'Order' => "<p style='color:".$color."'>".$row['order_num']."</p>",
                        'Description' => "<p style='color:".$color."'>".$row['description']."</p>",
                        $string1 => "<p style='color:".$color."'>".$row['odometer']."</p>",
                        'Serviced by' => "<p style='color:".$color."'>".$row['service_provider']."</p>",
                        'Total' => "<p style='color:".$color."' align='right'>".$ctotal."</p>",
                        'Status' => "<p style='color:".$color."'>".$status."</p>",
                        'Tools' => "<p style='color:".$color."'>".$tools2."</p>"
                        );
       }*/

       }

       $this->JTPlatinumVehicleWorkOrder->setCellData($arr);

       }


}

global $application;

global $Vehicle_Workorder_List_Frame;

//Creates the form
$Vehicle_Workorder_List_Frame=new Vehicle_Workorder_List_Frame($application);

//Read from resource file
$Vehicle_Workorder_List_Frame->loadResource(__FILE__);

//Shows the form
$Vehicle_Workorder_List_Frame->show();

?>